# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.757.13.3 -> 1.757.13.4 # drivers/char/agp/agpgart_be.c 1.41.1.3 -> 1.41.1.4 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/10/29 bjorn_helgaas@hp.com 1.757.13.4 # Print AGP version & mode when programming devices. # -------------------------------------------- # diff -Nru a/drivers/char/agp/agpgart_be.c b/drivers/char/agp/agpgart_be.c --- a/drivers/char/agp/agpgart_be.c Wed Oct 8 09:08:02 2003 +++ b/drivers/char/agp/agpgart_be.c Wed Oct 8 09:08:02 2003 @@ -452,15 +452,22 @@ /* Generic Agp routines - Start */ -static void agp_device_command(u32 command) +static void agp_device_command(u32 command, int agp_v3) { struct pci_dev *device; + int mode; + + mode = command & 0x7; + if (agp_v3) + mode *= 4; pci_for_each_dev(device) { u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP); if (!agp) continue; + printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n", + agp_v3 ? 3 : 2, device->slot_name, mode); pci_write_config_dword(device, agp + 8, command); } } @@ -551,7 +558,7 @@ * command registers. */ - agp_device_command(command); + agp_device_command(command, 0); } static int agp_generic_create_gatt_table(void) @@ -3739,8 +3746,6 @@ * settings, and adjust the readqueue to the minimum. */ - printk (KERN_INFO "AGP: Setting up AGPv3 capable device at %d:%d:%d\n", - device->bus->number, PCI_FUNC(device->devfn), PCI_SLOT(device->devfn)); pci_read_config_dword(device, cap_ptr + 4, &scratch); agp_v3 = (scratch & (1<<3) ) >>3; @@ -3759,15 +3764,11 @@ if (!((command & 0x10) && (scratch & 0x10) && (mode & 0x10))) command &= ~0x10; - if (!((command & 2) && (scratch & 2) && (mode & 2))) { + if (!((command & 2) && (scratch & 2) && (mode & 2))) command &= ~2; /* 8x */ - printk (KERN_INFO "AGP: Putting device into 8x mode\n"); - } - if (!((command & 1) && (scratch & 1) && (mode & 1))) { + if (!((command & 1) && (scratch & 1) && (mode & 1))) command &= ~1; /* 4x */ - printk (KERN_INFO "AGP: Putting device into 4x mode\n"); - } } } /* @@ -3790,7 +3791,7 @@ * command registers. */ - agp_device_command(command); + agp_device_command(command, 1); } @@ -4580,7 +4581,7 @@ * command registers. */ - agp_device_command(command); + agp_device_command(command, 0); } static int __init serverworks_setup (struct pci_dev *pdev)